package com.wjm.shootgame.shoot;

import com.wjm.shootgame.shoot.img.Images;

import java.awt.image.BufferedImage;

/*
* 子弹类
* */
public class Bullet extends FlyingObject{
    //速度 （值表示大小，正负表示方向）
    public int speed;

    //构造方法初始化
    public Bullet(){
        this.width=20;
        this.height=30;
        this.x=100;
        this.y=300;
        this.speed=2;
    }


    //用于输出初始化的值
    @Override
    public String toString() {
        return "Bullet{" +
                "speed=" + speed +
                ", width=" + width +
                ", height=" + height +
                ", x=" + x +
                ", y=" + y +
                '}';
    }


    @Override
    public BufferedImage getimage() {
        return Images.bulletImage;
    }
}
